How to export table as CSV with headings on Postgresql